import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @author ckf
 * @create 2018 05 10 17:16
 * @desc
 **/
public class homework3 {

    static List array = new ArrayList();
    static double r = Math.random();

    public static void serach() {
        do {
            int num = (int) ((Math.random() * 33) + 1);
            if (!array.contains(num)) {
                array.add(num);
            }
        } while (array.size() < 6);
    }

    public static void show() {
        int size = array.size();
        System.out.println("双色球预测号码：");
        for (int i = 0; i < size; i++) {
            Integer number = (Integer) array.get(i);
        }
        Collections.sort(array);
        for (int j = 0; j < size; j++) {
            Integer number2 = (Integer) array.get(j);
            System.out.print(number2 + ",");
        }
        System.out.println("+" + (int) ((Math.random() * 16) + 1));
        System.out.println("很遗憾你没有中奖!");
    }

    public static void main(String[] args) {
        serach();
        show();

    }
}

